/**
 * @author Peppe
 * 01/nov/2011
 */

package it.webflora.action;

import java.util.Map;

import org.apache.struts2.interceptor.SessionAware;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

import com.opensymphony.xwork2.ActionSupport;

public class WebFloraAction extends ActionSupport implements
		ApplicationContextAware, SessionAware {

	/**
	 * 
	 */
	private static final long serialVersionUID = -2754183197067922562L;
	private ApplicationContext context;
     
	private Map<String, Object> session;

	public Map<String, Object> getSession() {
	    return session;
	}

	@Override
	public void setApplicationContext(ApplicationContext applicationContext)
			throws BeansException {
		this.context = applicationContext;
	}

	public ApplicationContext getApplicationContext() {
		return this.context;
	}

	@Override
	public void setSession(Map<String, Object> session) {
		this.session = session;
	}
	
	public void setSessionObject(String key, Object obj){
	    this.session.put(key, obj);
	}
	

}
